package com.gykfbxxh.imovie.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.gykfbxxh.imovie.R;
import com.gykfbxxh.imovie.base.AppBaseAdapter;
import com.gykfbxxh.imovie.bean.film.FilmEntity;
import com.gykfbxxh.imovie.bean.news.ViewRightImg;

import java.util.List;

/**
 * Created by xuxinghai
 * On 2017/8/30
 */

public class FilmsAboutAdapter extends AppBaseAdapter<FilmEntity> {

    public FilmsAboutAdapter(List<FilmEntity> list, Context context) {
        super(list, context);
    }

    @Override
    public View creatView(int position, View convertView, ViewGroup parent) {
        FilmEntity listBean = list.get(position);
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.item_filmslist_image, null);
            ViewRightImg viewFilmsImg = new ViewRightImg(convertView);
            viewFilmsImg.loadAboutData(context,listBean);
        } else {
            ViewRightImg viewFilmsImg = (ViewRightImg) convertView.getTag();
            viewFilmsImg.loadAboutData(context,listBean);
        }
//        ViewRightImg viewFilmsImg = new ViewRightImg(convertView);
//        viewFilmsImg.loadAboutData(context,listBean);
        return convertView;
    }
}
